package com.jhhc.StormSurgeForecast.AstronomicalTide.Service;

import com.jhhc.StormSurgeForecast.AstronomicalTide.Pojo.BDMS_CALCULATESCHEME_M1;
import com.jhhc.StormSurgeForecast.AstronomicalTide.Pojo.TyphoonBO.TyphoonCschemeInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BDMS_CALCULATESCHEME_MService {

    BDMS_CALCULATESCHEME_M1 selcalSchemeId(String calSchemeId);
    BDMS_CALCULATESCHEME_M1 selectNewOneByModel(String modelId);

    BDMS_CALCULATESCHEME_M1 selectNewOneByModelMySql(String modelId,String startTime,String endTime);
    BDMS_CALCULATESCHEME_M1 selectShcemeByCalID(String calSchemeId);
    List<BDMS_CALCULATESCHEME_M1> selectShcemeByCalIds(@Param("calSchemeIds") List<String> calSchemeIds);
    //查询已保存的计算方案
    List<BDMS_CALCULATESCHEME_M1> selectShcemeFlagByCalID( String calSchemeId);
    //根据项目id方案编号获取
    List<BDMS_CALCULATESCHEME_M1> selectShcemeByPidCalID(Integer project,  String calSchemeId);

    //更新专报标记1
    int updateGen(String cschemeid,int gen);
    //根据日期和台风编号获取多个预报方案
    List<BDMS_CALCULATESCHEME_M1> selectShcemeByPidDate(@Param("projectId") Integer projectId,@Param("tfId") String tfId
            ,  @Param("startTime") String startTime, @Param("endTime") String endTime,
                                                        @Param("IsPublished") String IsPublished,String status,String forecaster,@Param("path") String path
    ,@Param("flag") String flag,String modelId);

    int saveCalSchemeInfo(BDMS_CALCULATESCHEME_M1 bdms_calculatescheme_m);
    int insertBdmsCalculateschemeM(BDMS_CALCULATESCHEME_M1 bdms_calculatescheme_m);
    BDMS_CALCULATESCHEME_M1 selectByNewOne();
    int deleteCalById(@Param("calSchemeId") List<String>  calSchemeId);

    BDMS_CALCULATESCHEME_M1 selectNewOneByPid(@Param("pid") Integer pid);

    void updataByCschemeid(int flag, String cschemeid);

    List<TyphoonCschemeInfo> getRealPaths(@Param("projectId") int projectId);
    BDMS_CALCULATESCHEME_M1 selectNewOneByPidModel(int projectId,String tfId,String modelId,String area );

    /**
     * 修改计算状态
     */
    int updateStatus(@Param("state") String state, @Param("cschemeId") String cschemeId);

    int updateArea(@Param("area") String area, @Param("cschemeId") String cschemeId);

    int deleteByCschemeId(@Param("cschemeId") String cschemeId);
    List<String> selectCschemeId(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("projectId") String projectId);
}